home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11334 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 77 73 2e 6f 6c 79 6d 70 |Path: ne|ws.olymp|
|00000010| 69 63 2e 6e 65 74 21 75 | 73 65 6e 65 74 0a 46 72 |ic.net!u|senet.Fr|
|00000020| 6f 6d 3a 20 22 45 72 69 | 6b 20 57 2e 20 41 6e 64 |om: "Eri|k W. And|
|00000030| 65 72 73 6f 6e 22 20 3c | 65 61 6e 64 65 72 73 40 |erson" <|eanders@|
|00000040| 6f 6c 79 6d 70 69 63 2e | 6e 65 74 3e 0a 4e 65 77 |olympic.|net>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |ng.c.Sub|ject: Re|
|00000070| 3a 20 56 61 72 69 61 6e | 74 20 52 65 63 6f 72 64 |: Varian|t Record|
|00000080| 73 20 69 6e 20 43 20 2e | 2e 2e 20 49 73 20 74 68 |s in C .|.. Is th|
|00000090| 65 72 65 20 61 20 77 61 | 79 20 3f 0a 44 61 74 65 |ere a wa|y ?.Date|
|000000a0| 3a 20 46 72 69 2c 20 32 | 32 20 4d 61 72 20 31 39 |: Fri, 2|2 Mar 19|
|000000b0| 39 36 20 32 32 3a 30 36 | 3a 32 30 20 2d 30 38 30 |96 22:06|:20 -080|
|000000c0| 30 0a 4f 72 67 61 6e 69 | 7a 61 74 69 6f 6e 3a 20 |0.Organi|zation: |
|000000d0| 4f 6c 79 6d 70 69 63 20 | 4e 65 74 0a 4d 65 73 73 |Olympic |Net.Mess|
|000000e0| 61 67 65 2d 49 44 3a 20 | 3c 33 31 35 33 39 34 44 |age-ID: |<315394D|
|000000f0| 43 2e 36 43 36 30 40 6f | 6c 79 6d 70 69 63 2e 6e |C.6C60@o|lympic.n|
|00000100| 65 74 3e 0a 52 65 66 65 | 72 65 6e 63 65 73 3a 20 |et>.Refe|rences: |
|00000110| 3c 50 69 6e 65 2e 4f 53 | 46 2e 33 2e 39 31 2e 39 |<Pine.OS|F.3.91.9|
|00000120| 36 30 33 31 39 31 37 30 | 32 35 32 2e 39 37 38 33 |60319170|252.9783|
|00000130| 42 2d 31 30 30 30 30 30 | 40 61 6c 66 61 2e 69 73 |B-100000|@alfa.is|
|00000140| 74 2e 75 74 6c 2e 70 74 | 3e 0a 4e 4e 54 50 2d 50 |t.utl.pt|>.NNTP-P|
|00000150| 6f 73 74 69 6e 67 2d 48 | 6f 73 74 3a 20 6f 6c 79 |osting-H|ost: oly|
|00000160| 32 2d 31 31 38 2e 6f 6c | 79 6d 70 69 63 2e 6e 65 |2-118.ol|ympic.ne|
|00000170| 74 0a 4d 69 6d 65 2d 56 | 65 72 73 69 6f 6e 3a 20 |t.Mime-V|ersion: |
|00000180| 31 2e 30 0a 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |1.0.Cont|ent-Type|
|00000190| 3a 20 74 65 78 74 2f 70 | 6c 61 69 6e 3b 20 63 68 |: text/p|lain; ch|
|000001a0| 61 72 73 65 74 3d 75 73 | 2d 61 73 63 69 69 0a 43 |arset=us|-ascii.C|
|000001b0| 6f 6e 74 65 6e 74 2d 54 | 72 61 6e 73 66 65 72 2d |ontent-T|ransfer-|
|000001c0| 45 6e 63 6f 64 69 6e 67 | 3a 20 37 62 69 74 0a 58 |Encoding|: 7bit.X|
|000001d0| 2d 4d 61 69 6c 65 72 3a | 20 4d 6f 7a 69 6c 6c 61 |-Mailer:| Mozilla|
|000001e0| 20 32 2e 30 47 6f 6c 64 | 42 31 20 28 57 69 6e 39 | 2.0Gold|B1 (Win9|
|000001f0| 35 3b 20 49 29 0a 54 6f | 3a 20 4e 75 6e 6f 20 53 |5; I).To|: Nuno S|
|00000200| 69 6c 76 61 20 3c 6c 34 | 31 34 37 31 40 61 6c 66 |ilva <l4|1471@alf|
|00000210| 61 2e 69 73 74 2e 75 74 | 6c 2e 70 74 3e 0a 0a 4e |a.ist.ut|l.pt>..N|
|00000220| 75 6e 6f 20 53 69 6c 76 | 61 20 77 72 6f 74 65 3a |uno Silv|a wrote:|
|00000230| 0a 3e 20 0a 3e 20 20 20 | 20 20 20 20 20 20 49 20 |.> .> | I |
|00000240| 77 6f 75 6c 64 20 6c 69 | 6b 65 20 74 6f 20 6b 6e |would li|ke to kn|
|00000250| 6f 77 20 69 66 20 74 68 | 65 72 65 20 69 73 20 61 |ow if th|ere is a|
|00000260| 6e 79 20 20 77 61 79 20 | 6f 66 20 69 6d 70 6c 65 |ny way |of imple|
|00000270| 6d 65 6e 74 69 6e 67 20 | 69 6e 20 43 20 61 0a 3e |menting |in C a.>|
|00000280| 20 73 74 72 75 63 74 75 | 72 65 20 74 68 61 74 20 | structu|re that |
|00000290| 69 66 20 61 20 64 65 74 | 65 72 6d 69 6e 65 64 20 |if a det|ermined |
|000002a0| 61 72 67 75 6d 65 6e 74 | 20 28 6f 72 20 69 6e 66 |argument| (or inf|
|000002b0| 6f 20 6f 72 20 64 65 70 | 65 6e 64 69 6e 67 20 6f |o or dep|ending o|
|000002c0| 6e 20 74 68 65 0a 3e 20 | 76 61 6c 75 65 20 6f 66 |n the.> |value of|
|000002d0| 20 61 20 70 61 72 74 69 | 63 75 6c 61 72 20 66 69 | a parti|cular fi|
|000002e0| 65 6c 64 20 6f 66 20 61 | 20 73 74 72 75 63 74 75 |eld of a| structu|
|000002f0| 72 65 29 20 63 6f 75 6c | 64 20 69 67 6e 6f 72 65 |re) coul|d ignore|
|00000300| 20 6f 72 20 61 63 6b 6e | 6f 6c 65 64 67 65 20 61 | or ackn|oledge a|
|00000310| 0a 3e 20 63 65 72 74 61 | 69 6e 20 66 69 65 6c 64 |.> certa|in field|
|00000320| 20 6f 66 20 74 68 65 20 | 73 74 72 75 63 74 75 72 | of the |structur|
|00000330| 65 20 2e 2e 2e 0a 3e 20 | 0a 3e 20 20 20 20 20 20 |e ....> |.> |
|00000340| 20 20 20 45 78 61 6d 70 | 6c 65 20 3a 0a 3e 20 20 | Examp|le :.> |
|00000350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|00000360| 74 72 75 63 74 20 62 6c | 61 20 7b 0a 3e 20 20 20 |truct bl|a {.> |
|00000370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000380| 20 20 20 20 20 20 69 6e | 74 20 66 69 65 6c 64 31 | in|t field1|
|00000390| 3b 0a 3e 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;.> | |
|000003a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 6e 74 20 | | int |
|000003b0| 66 69 65 6c 64 32 3b 0a | 3e 20 20 20 20 20 20 20 |field2;.|> |
|000003c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000003d0| 20 20 69 6e 74 20 66 69 | 65 6c 64 33 3b 0a 3e 20 | int fi|eld3;.> |
|000003e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000003f0| 20 20 20 20 20 20 20 20 | 7d 0a 3e 20 20 20 20 20 | |}.> |
|00000400| 20 20 20 20 41 6e 64 20 | 68 61 76 69 6e 67 20 61 | And |having a|
|00000410| 20 73 74 72 75 63 74 20 | 6c 6f 6f 6b 69 6e 67 20 | struct |looking |
|00000420| 6c 69 6b 65 20 74 68 69 | 73 20 6f 6e 65 2c 20 63 |like thi|s one, c|
|00000430| 6f 6e 73 69 64 65 72 20 | 66 69 65 6c 64 33 20 69 |onsider |field3 i|
|00000440| 66 0a 3e 20 66 69 65 6c | 64 31 3d 31 2c 20 6f 72 |f.> fiel|d1=1, or|
|00000450| 20 69 67 6e 6f 72 65 20 | 69 74 20 28 62 79 20 6e | ignore |it (by n|
|00000460| 6f 74 20 70 6c 61 63 69 | 6e 67 20 69 74 20 69 6e |ot placi|ng it in|
|00000470| 20 74 68 65 20 64 61 74 | 61 20 73 74 72 75 63 74 | the dat|a struct|
|00000480| 75 72 65 20 74 68 75 73 | 0a 3e 20 73 61 76 69 6e |ure thus|.> savin|
|00000490| 67 20 6d 65 6d 6f 72 79 | 20 2e 2e 2e 29 0a 0a 49 |g memory| ...)..I|
|000004a0| 66 20 79 6f 75 20 64 69 | 64 6e 27 74 20 77 61 6e |f you di|dn't wan|
|000004b0| 74 20 74 6f 20 75 73 65 | 20 22 75 6e 69 6f 6e 22 |t to use| "union"|
|000004c0| 2c 20 63 6f 75 6c 64 6e | 27 74 20 79 6f 75 20 64 |, couldn|'t you d|
|000004d0| 65 73 69 67 6e 20 6a 75 | 73 74 20 64 69 66 66 65 |esign ju|st diffe|
|000004e0| 72 65 6e 74 0a 73 74 72 | 75 63 74 75 72 65 73 20 |rent.str|uctures |
|000004f0| 74 68 61 74 20 61 6c 6c | 20 73 74 61 72 74 20 77 |that all| start w|
|00000500| 69 74 68 20 74 68 65 20 | 73 61 6d 65 20 62 79 74 |ith the |same byt|
|00000510| 65 20 6f 72 20 69 6e 74 | 65 67 65 72 20 61 6e 64 |e or int|eger and|
|00000520| 20 75 73 65 20 74 68 61 | 74 0a 61 73 20 66 6c 61 | use tha|t.as fla|
|00000530| 67 20 74 6f 20 69 6e 73 | 74 72 75 63 74 20 74 68 |g to ins|truct th|
|00000540| 65 20 70 72 6f 67 72 61 | 6d 20 77 68 61 74 27 73 |e progra|m what's|
|00000550| 20 69 74 20 6c 6f 6f 6b | 69 6e 67 20 61 74 2e 20 | it look|ing at. |
|00000560| 59 6f 75 20 6b 6e 6f 77 | 2c 20 6b 69 6e 64 61 0a |You know|, kinda.|
|00000570| 72 65 69 6e 76 65 6e 74 | 20 43 2b 2b 20 66 6f 72 |reinvent| C++ for|
|00000580| 20 79 6f 75 72 20 6f 77 | 6e 20 75 73 65 20 3a 29 | your ow|n use :)|
|00000590| 0a 0a 73 74 72 75 63 74 | 20 62 6c 61 31 20 7b 20 |..struct| bla1 { |
|000005a0| 69 6e 74 20 62 6c 61 54 | 79 70 65 20 3b 20 69 6e |int blaT|ype ; in|
|000005b0| 74 20 66 69 65 6c 64 31 | 20 3b 20 69 6e 74 20 66 |t field1| ; int f|
|000005c0| 69 65 6c 64 32 20 7d 20 | 0a 2f 2a 20 62 6c 61 54 |ield2 } |./* blaT|
|000005d0| 79 70 65 20 73 68 6f 75 | 6c 64 20 63 6f 6e 74 61 |ype shou|ld conta|
|000005e0| 69 6e 20 30 78 34 32 33 | 32 20 28 69 2e 65 2e 20 |in 0x423|2 (i.e. |
|000005f0| 22 42 31 22 29 0a 0a 73 | 74 72 75 63 74 20 62 6c |"B1")..s|truct bl|
|00000600| 61 32 20 7b 20 69 6e 74 | 20 62 6c 61 54 79 70 65 |a2 { int| blaType|
|00000610| 20 3b 20 69 6e 74 20 66 | 69 65 6c 64 32 20 3b 20 | ; int f|ield2 ; |
|00000620| 69 6e 74 20 66 69 65 6c | 64 33 20 7d 0a 2f 2a 20 |int fiel|d3 }./* |
|00000630| 62 6c 61 54 79 70 65 20 | 73 68 6f 75 6c 64 20 63 |blaType |should c|
|00000640| 6f 6e 74 61 69 6e 20 30 | 78 34 32 33 33 20 28 69 |ontain 0|x4233 (i|
|00000650| 2e 65 2e 20 22 42 32 22 | 29 0a 0a 73 77 69 74 63 |.e. "B2"|)..switc|
|00000660| 68 20 28 70 42 4c 41 2d | 3e 62 6c 61 54 79 70 65 |h (pBLA-|>blaType|
|00000670| 29 0a 20 20 7b 0a 20 20 | 20 20 63 61 73 65 20 30 |). {. | case 0|
|00000680| 78 34 32 33 32 20 3a 20 | 2f 2f 20 68 65 79 2c 20 |x4232 : |// hey, |
|00000690| 69 74 27 73 20 61 20 22 | 62 6c 61 31 22 20 73 74 |it's a "|bla1" st|
|000006a0| 72 75 63 74 75 72 65 0a | 20 20 20 20 63 61 73 65 |ructure.| case|
|000006b0| 20 30 78 34 32 33 33 20 | 3a 20 2f 2f 20 68 6d 6d | 0x4233 |: // hmm|
|000006c0| 2c 20 69 74 27 73 20 61 | 20 22 62 6c 61 32 22 20 |, it's a| "bla2" |
|000006d0| 73 74 72 75 63 74 75 72 | 65 0a 20 20 7d 0a 0a 61 |structur|e. }..a|
|000006e0| 6e 64 20 73 6f 20 6f 6e | 2e 2e 2e 0a |nd so on|.... |
+--------+-------------------------+-------------------------+--------+--------+